package com.example.dingzexi_homework1;

public class Friend {
    private String name;
    private int imageResId;
    private String lastMessage; // 存储最后一条消息的字段

    public Friend(String name, int imageResId, String lastMessage) {
        this.name = name;
        this.imageResId = imageResId;
        this.lastMessage = lastMessage;
    }

    public String getName() {
        return name;
    }

    public int getImageResId() {
        return imageResId;
    }

    public String getLastMessage() {
        return lastMessage; // 返回最后一条消息的文本
    }
}